#ifndef TEXTFILEWRITE
#define TEXTFILEWRITE
//Function from: http://www.evl.uic.edu/aej/594/code/ogl.cpp
	//Read in a textfile (GLSL program)
	// we can use this to write to a text file
	int textFileWrite(char *fn, char *s) 
	{
		FILE *fp;
		int status = 0;
	
		if (fn != NULL) {
			fp = fopen(fn,"w");

			if (fp != NULL) {			
				if (fwrite(s,sizeof(char),strlen(s),fp) == strlen(s))
					status = 1;
				fclose(fp);
			}
		}
		return(status);
	}
#endif
